#!/bin/bash

baseDir=/home/jenkins_pkg/tianhui-admin
jarName=ruoyi-admin.jar


if [ -f "${baseDir}/service.pid" ];
then
   kill -9 `cat ${baseDir}/service.pid`
    rm -f ${baseDir}/service.pid
fi


if [ -f "${baseDir}/${jarName}" ];
then
	nohup java -Dfile.encoding=utf-8 -jar ${baseDir}/${jarName} > ${baseDir}/out.log 2>&1 & echo $! > ${baseDir}/service.pid
fi

#sh /root/scheduled_task/send_wx.sh "laiqianba-admin-prod服务启动" "PID: `cat ${baseDir}/service.pid`"
